package com.kly.order.db.dbo;

import com.kly.dto.UserPCountDto;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class UserPCountDBO {

    private String rewardDate;

    private String userCode;

    private String benefitCode;

    private Integer privateCount;

    public static List<UserPCountDto> toDto(List<UserPCountDBO> userPCountDBOS) {
        List<UserPCountDto> userPCountDtoList = new ArrayList<>();
        for (UserPCountDBO userPCountDBO : userPCountDBOS) {
            UserPCountDto userPCountDto = new UserPCountDto();
            userPCountDto.setUserCode(userPCountDBO.getUserCode());
            userPCountDto.setBenefitCode(userPCountDBO.getBenefitCode());
            userPCountDto.setPrivateCount(userPCountDBO.getPrivateCount());
            userPCountDto.setRewardDate(userPCountDBO.getRewardDate());
            userPCountDtoList.add(userPCountDto);

        }
        return userPCountDtoList;
    }
}
